package com.ssm.controller;

import com.ssm.pojo.Teamwork;
import com.ssm.service.TeamworkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("teamwork.html")
public class TeamworkController {
    @Autowired
    private TeamworkService teamworkService;

    @RequestMapping(params = "act=get")
    @ResponseBody
    public String getTeamwork(Model model){
        List<Teamwork> teamworkList = teamworkService.getTeamwork();
        model.addAttribute("teamwork",teamworkList);
        return "leading/below";
    }

}
